home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 December / MACPOWER-1997-12.ISO.7z / MACPOWER-1997-12.ISO / AMUG / PROGRAMMING / Raven 1.2 Examples.sit / Raven 1.2 Examples / Quill / Source / ResourceInfoDialog.h < prev    next >
C/C++ Source or Header  |  1997-01-20  |  2KB  |  80 lines

  1. /*
  2.  *    File:        ResourceInfoDialog.h
  3.  *    Function:    A dialog that allows the user to change a resource's id and name.
  4.  *    Written by:    Jesse Jones
  5.  *
  6.  *  Copyright ゥ 1996 Jesse Jones. 
  7.  *    For conditions of distribution and use, see copyright notice in ZTypes.h  
  8.  *
  9.  *    Change History (most recent first):
  10.  *
  11.  *         <->     8/11/96    JDJ        Created
  12.  */
  13.  
  14. #pragma once
  15.  
  16. #include <ZDialogBox.h>
  17.  
  18. #include "ResourceMap.h"
  19.  
  20.  
  21. //-----------------------------------
  22. //    Forward References
  23. //
  24. class TTextBox;
  25.  
  26.  
  27. // ===================================================================================
  28. //    class CResourceInfoDialog
  29. // ===================================================================================
  30. class CResourceInfoDialog : public TDialogBox {
  31.     
  32.     typedef TDialogBox Inherited;
  33.     
  34. //-----------------------------------
  35. //    Initialization/Destruction
  36. //
  37. public:
  38.     virtual               ~CResourceInfoDialog();
  39.     
  40.     static    bool         Pose(CResourceMap* rsrcMap, const SResource& oldInfo, SResource* newInfo);
  41.         
  42. protected:
  43.                         CResourceInfoDialog();
  44.                         
  45. //-----------------------------------
  46. //    Inherited API
  47. //
  48. public:
  49.     virtual bool        Validate() const;
  50.                         // Returns true if the user has entered something reasonable.
  51.                         
  52. protected:
  53.     virtual void         OnReanimated();
  54.  
  55. //-----------------------------------
  56. //    TReanimator Support
  57. //
  58. public:
  59.     static     MReanimatable* Create(MReanimatable* parent);
  60.  
  61. //-----------------------------------
  62. //    Internal API
  63. //
  64. protected:
  65.             void         SetData(CResourceMap* rsrcMap, const SResource& info);
  66.             
  67.             SResource    GetData() const;
  68.                         // Should only be called if ValidInfo returns true.
  69.                         
  70. //-----------------------------------
  71. //    Member data
  72. //
  73. protected:
  74.     CResourceMap*    mRsrcMap;
  75.     SResource        mOldInfo;
  76.     TTextBox*        mNameField;
  77.     TTextBox*        mIdField;
  78. };
  79.  
  80.